
public class LogUtil {

		private static int LEVEL_HIGH = 1;
		private static int LEVEL_NORMAL = 2;
		private static int LEVEL_LOW = 3;
		private static int loglevel = LEVEL_NORMAL;
		
		/* Show logs with level check */
		public static void logv(int level, String msg) {
			if(level <= loglevel) {
				System.out.println(msg);
			}
		}
		
		/* Show logs with level check */
		public static void log(String msg) {
			logv(LEVEL_HIGH, msg);
		}
		
		public static void logi(String msg) {
			logv(LEVEL_NORMAL, msg);
		}
		
		public static void logd(String msg) {
			logv(LEVEL_LOW, msg);
		}
		
		public static void setLoglevel(int level) {
			loglevel = level;
		}
}
